package com.woniu.command.orderCommand;

import com.woniu.command.Command;
import com.woniu.command.handle.OrderCommandHandler;
import com.woniu.outlet.po.OrderDeliver;
import com.woniu.util.ApplicationContextHolder;
import org.springframework.beans.factory.annotation.Autowired;

public class UpdateOrderDeliverCommand implements Command<OrderDeliver,Boolean> {
    @Autowired
    private OrderCommandHandler handler;

    public UpdateOrderDeliverCommand(){
        this.handler = ApplicationContextHolder.getApplicationContext().getBean(OrderCommandHandler.class);
    }
    @Override
    public Boolean excute(OrderDeliver orderDeliver) {
        return this.handler.updateOrderDeliver(orderDeliver);
    }
}
